package Day11.File;

import java.io.File;

public class Lian11 {
    public static void main(String[] args) {
        File sc=new File("H:\\itheima");
        shan(sc);
    }

    private static void shan(File sc) {
        File[] f = sc.listFiles();
        for (File file : f) {
           if (file.isFile()){
               file.delete();
           }else {
               shan(file);
           }
        }
        sc.delete();
    }
}
